package AutoTraderFraudCalculator;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 *
 */
public class CarListings {
    
    private List<Listing> carAds;
    
    public CarListings(CarListings cl) {
        carAds = new ArrayList<Listing>();
        int size = cl.getSize();
        
        for (int i = 0; i < size; i++) {
            carAds.add(cl.getAd(i));
        }
    }
    
    public CarListings() {
        carAds = new ArrayList<Listing>();
    }
    
    public void pushAd(Listing carAd) {
        carAds.add(carAd);
    }
    
    public Listing getAd(int index) {
        return carAds.get(index);
    }
    
    public int getSize() {
        return carAds.size();
    }
}
